package com.fdl.dao.model.security;

import java.io.Serializable;
import java.util.List;

import com.fdl.dao.base.Dao;
import com.fdl.dao.security.PermissionDao;

/**
 * 权限 
 * @project: hb-intra
 * @Date:2010-8-6
 * @version  1.0
 * @Company: 33e9
 * @author zhangYong.huang
 */
public class Permission implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 9142404897065678371L;

	private static PermissionDao permissionDao;

	private Long id;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	private String name;

	private String descn;

	/**
	 * 系统管理员
	 */
	public static final String PERMISSION_NAME_SUPER_USER = "AUTH_ROOT";

	// Constructors

	/**
	 * default constructor
	 */
	public Permission() {}

	/**
	 * minimal constructor
	 */
	public Permission(String name) {
		this.name = name;
	}

	/**
	 * full constructor
	 */
	public Permission(String name, String descn) {
		this.name = name;
		this.descn = descn;
	}

	protected Dao getDao() {
		return permissionDao;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescn() {
		return this.descn;
	}

	public void setDescn(String descn) {
		this.descn = descn;
	}

	public static List getAll() {
		return permissionDao.getAll();
	}
}
